<?php

/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/



/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| This route group applies the "web" middleware group to every route
| it contains. The "web" middleware group is defined in your HTTP
| kernel and includes session state, CSRF protection, and more.
|
*/

Route::group(['middleware' => ['web']], function () {

    Route::group(['namespace'=>'PC'], function () {

        Route::get('/', 'Home\HomeController@index');                //   首页
        Route::get('/buy', 'Buy\BuyController@index');                   //   购买

//        Route::get('/newbei', 'Help\IndexController@newbei');         //  新手教程
//        Route::get('/introduction', 'Help\IndexController@functionIntroduction');         //  功能介绍
//        Route::get('/problem', 'Help\IndexController@commonProblem');         //  常见问题
//        Route::get('/trends', 'Help\IndexController@trends');                //  行业动态
//        Route::get('/info', 'Help\IndexController@info');                    //  公司简介
//        Route::get('/arealines', 'Help\IndexController@getlineData');                    // 获取用户IP
//        Route::get('/agent/help', function(){return view('PC.Help.agent')->with('title','帮助');});                    // 获取用户IP
        Route::get('/line/list', 'Help\IndexController@getlineData');                    // 获取用户IP


//        Route::get('/detail', 'Help\IndexController@detail');                    //  详情
        Route::get('/product', 'Product\ProductController@index');          //产品列表
        Route::get('/generalizations', 'Product\ProductController@generalizations'); //单C段固定IP
        Route::get('/routing', 'Product\ProductController@routing');        //软路由控制
        Route::get('/area', 'Help\IndexController@area');                    //  区域分布
        Route::get('/document', 'Help\IndexController@index');               //  帮助
        Route::get('/download', 'Download\IndexController@index');               //  下载
        Route::get('/login', 'User\LoginController@login');                         // 登录
        Route::get('/register', 'User\RegisterController@register');                  // 注册
        Route::get('/logout', 'User\LogoutController@logout');                         //  注销

        Route::post('/dologin', 'User\LoginController@doLogin');                         // 登录
        Route::post('/doregister', 'User\RegisterController@doRegister');                  // 注册
        Route::post('/forgetpw', 'User\IndexController@doForgetPassword');                  // 忘记密码

        Route::get('/validateCode', 'ValidateCode\ValidateCodeController@doimg');                    // 验证码
        Route::get('/kefuqq', 'User\IndexController@KeFuqq');                                // 客服QQ
        Route::get('/getTeamqq', 'User\IndexController@getTeamqq');                          // 客服QQ
        Route::get('/getcode', 'ValidateCode\ValidateCodeController@doimg');                    // 验证码
        Route::post('/send/code', 'Code\CodeController@getCode');                                     // 短信验证码
        Route::get('/getip', 'Code\CodeController@getIp');                                      // 获取用户IP
        Route::get('/getorderlist', 'Order\IndexController@index');                                      // 获取用户IP


        //  agent
        Route::get('/invite/agents', 'Agent\AgentController@getInvitebAgentView');                    // 诚邀代理页面
        Route::post('/agent/register', 'Agent\AgentController@doAgentRegister');                           // 代理注册

        //  extension


        Route::post('/download', 'Download\IndexController@ExtensionDownload');               //  推广下载
        Route::post('/consultation', 'Home\HomeController@ExtensionConsultation');               //  推广咨询


        Route::group(['middleware' => ['Login']], function () {

            Route::get('/user', 'User\IndexController@index');                                //   个人中心
            Route::get('/user/invite', 'User\IndexController@invite');                       //   要请
            Route::get('/setting', 'User\IndexController@set');                              //  设置

            Route::get('/update/password', 'User\UpdateController@updatePassword');                              //  修改密码
            Route::get('/bind/email', 'User\UpdateController@updateEmail');                                 //  修改邮箱
            Route::get('/bind/phone', 'User\UpdateController@updatePhone');                                     //  绑定手机号
            Route::get('/bind/qq', 'User\UpdateController@updateQQ');                                         //  绑定qq

            Route::get('/pay', 'Pay\PayController@index');                                  //   购买
            Route::get('/createOrder', 'Pay\PayController@createOrder');                                  //  生成订单
            Route::get('/aliPay', 'Pay\PayController@aliPay');                                  //  调起支付宝
            Route::post('/checkorderstatus', 'Pay\PayController@checkWxPayOrderStatus');           //  检测微信支付订单状态

        });

    });




});
